import {createRouter, createWebHashHistory} from 'vue-router'
import LayoutView from "@/components/LayoutView.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: '',
      redirect: '/welcome'
    },
    {
      path: '/welcome',
      name: 'Welcome',
      component: ()=>import('@/views/home/WelcomeView.vue'),
    },
    {
      path: '/home',
      name: 'Home',
      component: LayoutView,
      redirect:'/home/index',
      children:[
        {
          path: 'index',
          name: 'Index',
          component: ()=>import('@/views/home/HomeView.vue'),
        },
        {
          path: 'apps',
          name: 'Apps',
          component: ()=>import('@/views/home/HomeView.vue'),
        },
        {
          path: 'music',
          name: 'Music',
          component: ()=>import('@/views/home/HomeView.vue'),
        },
        {
          path: 'detail',
          name: 'Detail',
          component: ()=>import('@/views/home/DetailView.vue'),
        }
      ]
    },
  ]
})

export default router
